package com.LinSoft.EquationSolver;

import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.view.View.*;
import android.content.*;
import android.text.*;
import android.graphics.Color;

public class MainActivity extends Activity
{
    /** Called when the activity is first created. */
	Button cb_x1, cb_x2, cb_xy1;
	TextView ct_about;
    @Override
    public void onCreate(Bundle savedInstanceState)
	{
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
		
		cb_x1 = (Button)findViewById(R.id.xb_x1);
		cb_x1.setOnClickListener(new OnClickListener()
			{
				public void onClick(View v)
				{
					startActivity(new Intent(MainActivity.this, x1solve.class));
				}
			});
			
		cb_x2 = (Button)findViewById(R.id.xb_x2);
		cb_x2.setOnClickListener(new OnClickListener()
			{
				public void onClick(View v)
				{
					startActivity(new Intent(MainActivity.this, x2solve.class));
				}
			});
			
		cb_xy1 = (Button)findViewById(R.id.xb_xy1);
		cb_xy1.setOnClickListener(new OnClickListener()
			{
				public void onClick(View v)
				{
					startActivity(new Intent(MainActivity.this, xy1solve.class));
				}
			});
			
		ct_about = (TextView)findViewById(R.id.xt_about);
		ct_about.setTextColor(Color.BLUE);
		ct_about.setText(Html.fromHtml("<u>" + getResources().getString(R.string.s_about) + "</u>"));
		ct_about.setOnClickListener(new OnClickListener()
			{
				public void onClick(View v)
				{
					ct_about.setTextColor(Color.GRAY);
					new AlertDialog.Builder(MainActivity.this)
						.setTitle(R.string.s_about)
						.setMessage(R.string.about_msg)
						.setPositiveButton(R.string.s_yes, null)
						.show();
				}
			});
    }
	
}
